home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1989 May & June
/
rerun-1989-05-06.d64
/
animation maker
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
161 lines
1 ifpeek(52009)<>56thenload"ml",8,1
2 ifpeek(56)=40then64
3 poke56334,0:poke1,51:poke251,0:poke252,208:poke253,0:poke254,56:poke53202,0
4 poke53203,8:sys53160:poke1,55:poke56334,1:sys52000:poke737,1:poke53281,11
5 poke650,255:print"[147]":poke736,1:goto64
10 geta$:ifa$=""then10
11 return
16 poke52405,4:poke52444,86:sys52000:poke737,1:y=53280
18 print""spc(8)"pick(2-8) "s$:gosub10
20 v=val(a$):ifv>1andv<9thena=(17675+(3325*(v-2))):pokey,7:poke53269,1:goto22
21 goto64
22 z=a:poke737,1:poke710,166:poke712,138:poke764,4:poke2040,156+(4*v):poke735,1
26 pokey+7,v:gosub46:iffbthen26
28 pokey,10:ford=1to250:next
30 geti$:pokey,10:v=val(i$):gosub46:iffb=0thenpokea,0:goto16
32 ifvandv<5thenpoke752,v
34 ifpeek(197)<>64thenpokey,7:goto34
36 js=peek(56320)and15:ifjs=15then30
38 k=peek(710):ifk=0thenk=1
40 pokea,k:pokea+1,peek(711):pokea+2,peek(712):a=a+3
42 ifa>z+3321thenpokea,0:goto16
44 goto36
46 fb=peek(56320)and16:return
64 clr:restore:poke53269,0:poke53281,11:gosub102
65 print"[147]animation maker":print"f1[146] background
70 [153]"f2wait save file":[153]"f3wait movement":[151]52405,24:[151]52444,64
72 [153]"f4wait char-set":s$[178]"return=menuwait":[153]"f5wait sprites
74 print"f6[146] load file":print"f7[146] demo mode":gosub325:poke53280,12:gosub600
85 gosub10:v=asc(a$):ifv>132thenonv-132goto800,16,182,136,106,348,106
86 goto85
102 poke53272,21:return
106 poke56333,127:poke788,49:poke789,234:poke56333,129
120 zx$="save":zx=1:z=0:ifa$="[139]"thenzx$="load":zx=0:z=10
121 print""zx$;:n$="":input"-name";n$:ifn$=""then64
122 poke250,0:poke251,40:poke252,0:poke253,160:open1,8,zx,"0:"+n$:sys53125+z
123 close1:open15,8,15:input#15,a$,a$:close15:ifa$="ok"then64
124 print""a$:ford=0to999:next:goto64
136 sys52000:poke737,1:forx=2to9:poke740+x,1:next:poke710,170
138 poke712,228:gosub10:goto64
182 sys52000:gosub102:poke734,0:gosub334:gosub326:dimt(64):poke841,8:poke842,7
184 poke53270,200:gosub998:goto312
194 gosub217:gosub10
197 v=asc(a$):h=q4+64*sp:ifv=95then312
198 ifv=136then306
199 ifv=13then64
202 ifv>132andv<141ande6then216
203 ifv<49orv>56then194
204 gosub998:sp=v-49:e6=1:gosub999
206 xx=1:poke840,peek(53287+sp):print"";:h=q4+64*sp
207 h%=h/256:l%=h-h%*256:poke251,l%:poke252,h%:sys51750:goto250
216 onv-132goto250,232,234,306,230,220,238,194
217 print"[146]"spc(185)"pick(1-8)or(_)[146] "spc(65)"set"se;o$:return
220 print""spc(185)" copy which? [146] "spc(65)" pick (1-8) ":gosub10
228 a=val(a$):ifathend=q4+64*(a-1):forr=0to63:pokeh+r,peek(d+r):next:goto206
229 goto194
230 forr=htoh+63:poker,0:next:goto206
232 forr=htoh+63:poker,255-peek(r):next:goto206
234 forr=htoh+62:t(r-h)=peek(r):next:forr=htoh+60step3
236 forl=0to2:poker+l,t((60+l)-(r-h)):next:next:goto206
238 forr=htoh+62:t(r-h)=peek(r):next
240 forr=htoh+60step3:poker,t(r+2-h):poker+2,t(r-h):next
242 foru=htoh+63:poke828,peek(u):sys51894:pokeu,peek(829):next:goto206
250 gosub217:print""spc(185)y$:l=1184:m=(q4+(sp*64)):e=7:f=c:b=0
254 cv=peek(l+54272):gosub700:ifa$=""then276
260 ifa$="[145]"then280
261 ifa$="[157]"then284
262 ifa$=""then292
264 ifa$="1"thenw=0:cv=0:goto304
266 ifa$="2"thenw=e2(e):cv=8:goto304
268 ifa$="3"thenw=e3(e):cv=peek(53287+sp):goto304
270 ifa$="4"thenw=e4(e):cv=7:goto304
272 ifa$="[133]"thengosub300:goto194
274 gosub300:goto197
276 iff=>c+60then254
278 u=3:a=40:goto302
280 iff<=c+2then254
282 u=-3:a=-40:goto302
284 ife=7andb=0then254
286 a=-2:ife<7thene=e+2:u=0:goto302
288 e=1:b=b-1:u=-1:goto302
292 ife=1andb=2then254
294 a=2:ife>1thene=e-2:u=0:goto302
296 e=7:b=b+1:u=1:goto302
300 pokel,160:pokel+1,160:pokel+54272,cv:pokel+54273,cv:return
302 f=f+u:m=m+u:l=l+a:goto254
304 gosub300:pokem,(peek(m)and(255-(2^e+2^(e-1))))orw:goto254
306 e6=0:gosub328:gosub325:poke749,1:gosub10:poke749,0:goto314
312 e6=0:ifxxthengosub328
313 se=se+1:ifse=5thense=1
314 e=160+(8*(se-1)):ford=0to7:poke2040+d,e+d:next:q4=10240+(512*(se-1))
316 ifse=1theno$="(01-08)":e=1:f=2
318 ifse=2theno$="(09-16)":e=3:f=4
320 ifse=3theno$="(17-24)":e=5:f=6
322 ifse=4theno$="(25-32)":e=7:f=8
323 ford=0to3:poke53287+d,e:next:ford=0to3:poke53291+d,f:next:goto194
325 ford=1to8:poke53286+d,d:next:return
326 poke53264,192:forr=0to10step2:poker+53248,32+r*20:next
327 poke53260,16:poke53262,56:forr=0to14step2:poker+53249,53:next:return
328 xx=0:print"";:poke251,132:poke252,3:sys51750:gosub998:return
334 dataedit-entry,clear,reverse,copy,flip^,flip_,animate
336 print"[147]"spc(240):ford=1to7:reada$:printspc(65)"f"d"[146]"a$:next
338 printspc(65)s$;:return
348 o=14336:print"[147]":ford=0to7:print"[179] [171]":next:sys52000
364 poke53269,0:gosub416:print" [221]use+-or f1 f3 to jump[221]f5 rev[221]f7 clr"
365 geta$:ifpeek(197)=40andc<127thenc=c+1
366 ifpeek(197)=43andcthenc=c-1
369 poke1479,c:poke1466,c+128:print" [157][157][157][157]"c
370 ford=1to99:ifpeek(197)=64thennext:poke55751,11:poke55738,1:goto374
371 goto365
374 poke840,7:poke841,4:poke842,3:print"";:forr=0to7
378 poke828,peek(r+(o+8*c)):sys51797:printspc(32);:next:print"[157][157][157]"y$spc(7)s$;
380 l=1349:s=(o+(8*c)):e=7:f=c
381 cv=peek(l+54272)
382 gosub700:ifa$=chr$(13)then64
384 ifa$="[136]"thens=(o+(8*c)):forr=stos+7:poker,0:next:goto364
385 ifa$="[135]"thens=(o+(8*c)):forr=stos+7:poker,255-peek(r):next:goto364
387 ifa$="[133]"thenc=40:goto364
388 ifa$="[134]"thenc=80:goto364
390 ifa$="+"ora$="-"then365
391 ifa$=""andf<c+7thenl=l+40:f=f+1:s=s+1:goto381
392 ifa$="[145]"andf>cthenl=l-40:f=f-1:s=s-1:goto381
393 ifa$="[157]"ande<7thenl=l-2:e=e+2:goto381
394 ifa$=""ande>1thenl=l+2:e=e-2:goto381
395 ifa$="1"thend=e1(e):cv=0:g=1
396 ifa$="2"thend=e2(e):cv=4:g=1
398 ifa$="3"thend=e3(e):cv=7:g=1
400 ifa$="4"thend=e4(e):cv=3:g=1
402 ifg=1thenpokes,(peek(s)and(255-(2^e+2^(e-1))))ord:gosub300:g=0
406 goto382
416 print"[151]"spc(220)"@abcdefghijklmno"spc(24)"pqrstuvwxyz[\]^_
418 [153][166]20)" !'#$%&'()*+,-./"[166]24)"0123456789:;<=>?
420 printspc(20)"[192][193][194][195][196][197][198][199][200][201][202][203][204][205][206][207]"spc(24)"[208][209][210][211][212][213][214][215][216][217][218][219][220][221][255][223]
422 [153][166]20)"closegetnewtab(tofnspc(thennotstep+-*/^and"[166]24)"or>=<sgnintabsusrfrepossqrrndlogexpcossinopen":[142]
600 e4(7)[178]192:e4(5)[178]48:e4(3)[178]12:e4(1)[178]3:e3(7)[178]128:e3(5)[178]32:e3(3)[178]8:e3(1)[178]2
604 e2(7)[178]64:e2(5)[178]16:e2(3)[178]4:e2(1)[178]1:y$[178]" # 1-4 colors wait":[142]
700 [129]r[178]0[164]9:[151]l,81:[151]l[170]1,81:[151]l[170]54272,3:[151]l[170]54273,3:[161]a$
702 [139]a$[178]""[167][130]:[129]r[178]0[164]9:[141]300:[161]a$:[139]a$[178]""[167][130]:[137]700
704 [141]300:[142]
800 [158]52000:[151]53269,0:[151]737,1:c[178]11:o[178]54272:l[178]1024
802 n[178]0:s[178][194](l):f[178][194](l[170]o)
804 u[178]128:[139]s[177]127[167]u[178][171]128
805 [129]r[178]0[164]9:b(0)[178]s[170]u:b(1)[178]s:[151]l,b(n):[161]a$:[151]l[170]o,c
806 [139]a$[178]""[167][130]:n[178][182](n[171]1):[137]804
808 v[178][198](a$):[151]l[170]o,f:[151]l,s
810 [139]v[178]17[175]l[179]1984[167]l[178]l[170]40:[137]802
812 [139]v[178]29[175]l[179]2023[167]l[178]l[170]1:[137]802
814 [139]v[178]157[175]l[177]1024[167]l[178]l[171]1:[137]802
815 [139]v[178]145[175]l[177]1063[167]l[178]l[171]40:[137]802
817 [139]v[178]133[167]w[178][182](w[171]128)
818 [139]v[178]134[175]c[179]15[167]c[178]c[170]1
820 [139]v[178]135[175]c[177]1[167]c[178]c[171]1
821 [139]v[178]13[167][151]736,1:[138]
823 [139]v[179]32[176]v[177]127[175]v[179]161[167]802
824 [139]v[179]64[167]834
826 [139]v[179]192[167]v[178]v[171]64:[137]834
828 [139]v[179]224[167]v[178]v[171]128
834 [151]l,v[170]w:[151]l[170]o,c:[139]l[179]2023[167]l[178]l[170]1
836 [137]802
998 [153]"":[129]d[178]1[164]40:[153]"asc";:[130]:[142]
999 [153]""[166]2[170](5[172]sp))"-":[142]